<?php

namespace app\common\service;


class ConfigService
{
    public static function host($systemId)
    {
        $systemName = self::systemName($systemId);
        return config('host')[$systemName];
    }

    public static function authWechatMini($systemId)
    {
        $systemName = self::systemName($systemId);
        return config('auth.wechat_mini')[$systemName];
    }

    public static function systemName($systemId)
    {
        switch ($systemId) {
            case '1':
                $name = 'cdc';
                break;
            case '2':
                $name = 'shop';
                break;
            default :
                $name = 'purchase';
        }
        return $name;
    }
}